#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (a); i >= (b); i--)
#define endl '\n'
const int N = 2e5 + 5;
const double eps = 5e-10;

int n, m;
ll x[N], y[N];
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n;
  rep(i, 1, n) cin >> x[i] >> y[i];
  double ans = -1;
  rep(i, 2, n) {
    double now = 1.0 * (x[i] * y[i - 1] - x[i - 1] * y[i]) / (x[i] - x[i - 1]);
    ans = max(ans, now);
  }
  if (ans < 0)
    cout << -1;
  else
    cout << fixed << setprecision(18) << ans;
  return 0;
}